package com.iknow.activity;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class FriendInfoActivity extends TabActivity
{
  private TabHost mHost;
  private Intent mInfoIntent;
  private Intent mQingboIntent;
  private RadioGroup mRadioGroup;
  private Intent mRosterInent;

  private void initButton()
  {
    this.mRadioGroup = ((RadioGroup)findViewById(2131296334));
    this.mRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener(this)
    {
      public void onCheckedChanged(, int paramInt)
      {
        int i = paramRadioGroup.indexOfChild((RadioButton)paramRadioGroup.findViewById(paramInt));
        FriendInfoActivity.access$0(this.this$0).setCurrentTab(i);
      }
    });
  }

  private void initIntents()
  {
    this.mInfoIntent = new Intent(this, FriendActivity.class);
    this.mQingboIntent = new Intent(this, FriendQingboActivity.class);
    this.mRosterInent = new Intent(this, FriendRosterActivity.class);
  }

  private void initTabPage()
  {
    TabHost.TabSpec localTabSpec1 = this.mHost.newTabSpec("info");
    localTabSpec1.setContent(this.mInfoIntent);
    localTabSpec1.setIndicator("info");
    this.mHost.addTab(localTabSpec1);
    TabHost.TabSpec localTabSpec2 = this.mHost.newTabSpec("qingbo");
    localTabSpec2.setContent(this.mQingboIntent);
    localTabSpec2.setIndicator("qingbo");
    this.mHost.addTab(localTabSpec2);
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    requestWindowFeature(1);
    setContentView(2130903059);
    this.mHost = getTabHost();
    initIntents();
    initButton();
    initTabPage();
  }
}